package com.example.springframeworklearning.config;

import com.example.springframeworklearning.converter.StringOrderStatusConverterFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.ConverterFactory;

/**
 * @author luo
 * @since 2022/9/20 09:13
 */
//@Configuration 因为 已经配置了 ConverterService 了，所以就不用再继续配置了
public class ConverterFactoryConfig {

    @Bean
    public ConverterFactory<String,Enum> string2EnumConverterFactory(){
        return new StringOrderStatusConverterFactory();
    }
}
